/****************************************************************************
 * Copyright (c) 2021 Qualcomm Technologies International, Ltd.
****************************************************************************/
/**
 * \file    wnd200_public.h
 * \ingroup lib_private\aanc
 *
 * WND200 library public header file.
 *
 *
 */
#ifndef _WND200_LIB_PUBLIC_H_
#define _WND200_LIB_PUBLIC_H_

/* Imports WND structures */
#include "wnd200_struct_public.h"

/******************************************************************************
Public Function Definitions
*/
/**
 * \brief  Determine how much memory to allocate for WND200_xMIC_DMX (bytes).
 *
 * \return  size value that will be populated with the memory required for
 *          WND200_xMIC_DMX (bytes).
 */
extern uint16 aanc_wnd200_1mic_dmx_bytes(void);
extern uint16 aanc_wnd200_2mic_dmx_bytes(void);
extern uint16 aanc_wnd200_common_dmx_bytes(void);

/**
 * \brief  Determine how much memory to allocate in DM1 for WND200_xMIC (bytes).
 *
 * \return  size value that will be populated with the memory required for
 *          WND200_xMIC_DM1 (bytes).
 */
extern uint16 aanc_wnd200_1mic_dm1_bytes(void);
extern uint16 aanc_wnd200_2mic_dm1_bytes(void);
extern uint16 aanc_wnd200_common_dm1_bytes(void);

/**
 * \brief  Create the WND200_COMMON data object.
 *
 * \param  p_common Pointer to WND200_COMMON object to be populated.
 * \param  p_dm1    Pointer to DM1 memory allocation.
 *
 * \return  boolean indicating success or failure.
 */
extern bool aanc_wnd200_common_create(WND200_COMMON_DMX *p_common, uint8 *p_dm1);

/**
 * \brief  Initialize the WND200_xMIC data object.
 *
 * \param  p_asf    Pointer to AANC feature handle.
 * \param  p_wnd    Pointer to the WND200_xMIC object.
 * \param  p_common Pointer to the WND200_COMMON object.
 * \return  boolean indicating success or failure.
 */
extern bool aanc_wnd200_1mic_initialize(void *p_asf,
                                        WND200_1MIC_DMX *p_wnd,
                                        WND200_COMMON_DMX *p_common);
extern bool aanc_wnd200_2mic_initialize(void *p_asf,
                                        WND200_2MIC_DMX *p_wnd,
                                        WND200_COMMON_DMX *p_common);
/**
 * \brief  Initialize the WND200_COMMON data object.
 *
 * \param  p_asf    Pointer to AANC feature handle.
 * \param  p_common Pointer to the WND200_COMMON object.
 * \return  boolean indicating success or failure.
 */
extern bool aanc_wnd200_common_initialize(void *p_asf,
                                          WND200_COMMON_DMX *p_common);

/**
 * \brief  Cleanup the WND200_COMMON data object.
 *
 * \param  p_wnd    Pointer to the WND200_COMMON object.
 *
 * \return  boolean indicating success or failure.
 */
extern bool aanc_wnd200_common_destroy(WND200_COMMON_DMX *p_common);

/**
 * \brief  Process data with WND200_xMIC.
 *
 * \param  p_asf    Pointer to AANC feature handle.
 * \param  p_wnd    Pointer to the WND200_xMIC object.
 * \param  p_common Pointer to the WND200_COMMON object.
 *
 * \return  boolean indicating success or failure.
 */
extern bool aanc_wnd200_1mic_process_data(void *p_asf,
                                          WND200_1MIC_DMX *p_wnd,
                                          WND200_COMMON_DMX *p_common);
extern bool aanc_wnd200_2mic_process_data(void *p_asf,
                                          WND200_2MIC_DMX *p_wnd,
                                          WND200_COMMON_DMX *p_common);

#endif /* _WND200_LIB_PUBLIC_H_ */
